#ifndef DATAFILE_H_
#define DATAFILE_H_

enum ETargetingMode { Manual, Auto };

struct SDataFile
{
	char SatTime[20];
	long double Longitude; // this is actually 64 bit float AKA double
	long double Latitude;
	float Altitude;
	int SatNum;
	float Pressure1;
	float Pressure2;
	float PressureAlt;
	float TemperatureADC1;
	float TemperatureADC2;
	float TemperatureExternal;
	float Power5VADC1;
	float Power5VADC2;
	float Levels[3];
	float Mag[3];
	float Rots[3];
	float RPY[3];
	
	// Tail Pot/Servo
	float TailPotRefAngle; // target angle!
	float TailPotVoltsZero; // zero position voltage
	float TailPotVolts; // volts!
	float TailPotAngle; // calculated value!
	float TailPotKp; // contrloler gain
	float TailPotKi; // controller I gain
	float TailPotIntegr; // controller I gain
	
	float VertSpeed;
	float AltFiltered;
	
	int Servo1uS;
	int Servo2uS;
	int Servo3uS;
	int Servo4uS;
	float Servo5Duty;
	float Servo6Duty;
	float Servo7Duty;
	float Servo8Duty;
	
	int FaileSafeShutdown;
	
	int State;
	float LoopTime;
	long double MissionTime; // [s]
	int ComTXFails;
	
	float Vars[30];
};

#endif /*DATAFILE_H_*/
